package com.api.common.hander;
import com.api.model.reslut.Result;
import lombok.extern.slf4j.Slf4j;

import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;



@RestControllerAdvice
@Slf4j
public class GlobalExceptionHandler {
    @ExceptionHandler
    public Result BaseExceptionHandler(Exception e){
        return Result.faile(e.getMessage());
    }


}
